/**
 * 
 */
package edu.wpi.cs509.messages.client;

import java.util.List;

import edu.wpi.cs509.representation.UserStatistics;

/**
 * This class implements the reply message for a get-leaderboard request.
 * @author sparadis
 *
 */
public class MsgLeaderBrdReply extends MsgClientContext {
	/**
	 * serializable version number
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * The leaderboard. 
	 */
	protected List<UserStatistics> stats;
	
	/**
	 * The starting rank index
	 */
	protected int startRank;
	
	/**
	 * Constructor.
	 * @param stats: the requested statistics
	 * @param startRank : the starting rank
	 */
	public MsgLeaderBrdReply(List<UserStatistics> stats, int startRank) {
		this.stats = stats;
		this.startRank = startRank;
	}
	/**
	 * Give the stats to the client.
	 */
	public void rxExecute() {
		getCl().receiveLeaderBoard(stats, startRank);
	}

}
